//
//  COShopInfoCell.m
//  MJApp
//
//  Created by John on 15/3/30.
//  Copyright (c) 2015年 wangliang. All rights reserved.
//

#import "COShopInfoCell.h"
@interface COShopInfoCell()
@property (weak, nonatomic) IBOutlet UIImageView *picImagView;
@property (weak, nonatomic) IBOutlet UILabel *productDesLabel;
@property (weak, nonatomic) IBOutlet UILabel *singlePricelabel;

@end
@implementation COShopInfoCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+(instancetype)cellForTableview:(UITableView *)tableview{

    static NSString * ID = @"COShopInfoCell";
    COShopInfoCell * cell = [tableview dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[NSBundle mainBundle] loadNibNamed:ID owner:nil options:nil].lastObject;
    }
    cell.cellH = 87;
    return cell;
}

- (void)setInfoDic:(NSDictionary *)infoDic {
    
    [super setInfoDic:infoDic];
    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kUrl,infoDic[@"image"]]];
    [self.picImagView sd_setImageWithURL:url];
    self.productDesLabel.text = infoDic[@"name"];
    self.singlePricelabel.text = [NSString stringWithFormat:@"¥%@",infoDic[@"price"]];
}

@end

